<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>036-绝对定位</title>
		<style>
			.outer {
				width: 400px;
				height: 400px;
				background-color: pink;
				position: relative;
			}

			.inner1 {
				width: 100px;
				height: 100px;
				background-color: red;
			}

			.inner2 {
				width: 100px;
				height: 100px;
				background-color: orange;
				position: absolute;
				top: 100px;
				left: 0;
				transition: 0.5s all linear;
			}

			.inner3 {
				width: 100px;
				height: 100px;
				background-color: yellow;
			}

			/* 当鼠标移入到 outer 元素时，inner2 元素的样式发生变化 */
			.outer:hover .inner2 {
				left: 100px;
			}
		</style>
	</head>
	<body>
		<div class="outer">
			<div class="inner1"></div>
			<div class="inner2"></div>
			<div class="inner3"></div>
		</div>
	</body>
</html>
